package com.example.administrator.yuejian_2.interservice;

import android.widget.EditText;

import com.example.administrator.yuejian_2.bean.CollectBean;
import com.example.administrator.yuejian_2.bean.TrainDetailBean;
import com.example.administrator.yuejian_2.bean.TrainListBean;
import com.example.administrator.yuejian_2.bean.TrainEnterBean;
import com.example.administrator.yuejian_2.bean.TrainOrderDetailBean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/10/19.
 */

public interface TrainService {
    @POST("course/courseprimerlist")
    Call<List<TrainListBean>> courseprimerlist();

    @POST("course/coursenooblist")
    Call<List<TrainListBean>> coursenooblist();

    @POST("course/courseadvancelist")
    Call<List<TrainListBean>> courseadvancelist();

    @POST("course/coursealllist")
    Call<List<TrainListBean>> coursealllist();

    @POST("course/detail")
    Call<TrainDetailBean> detail(@Query("course_id") int train_id);

    @POST("course/trainorderadd")
    Call<TrainEnterBean> trainorderadd(@Query("u_id") int user_id,
                                       @Query("course_id") int train_id,
                                       @Query("count") int count,
                                       @Query("payway") String payway,
                                       @Query("train_username") String train_username,
                                       @Query("train_tel") String train_tel);

    @POST("course/trainorderdetail")
    Call<TrainOrderDetailBean> trainorderdetail(@Query("trainorder_id") int trainorder_id);

    @POST("course/addcollect")
    Call<CollectBean> addcollect (@Query("user_id") int user_id,
                                    @Query("train_id") int train_id);

    @POST("course/deletecollect")
    Call<CollectBean> deletecollect (@Query("user_id") int user_id,
                                     @Query("train_id") int train_id);

      @POST("course/getstate")
      Call<CollectBean> getstate (@Query("user_id") int user_id,
                                  @Query("train_id") int train_id);

    @POST("course/search")
    Call<List<TrainListBean>> search (@Query("course_name") String train_name);







}
